This invention relates to computer-generated graphics and in particular to efficiently rendering video data.
Currently, in order to render video data, a source video signal is received by an interface port and sent to a video decoder that digitizes the incoming data. Thereafter Mip Map data may be created in real time and written into a memory buffer (static texture memory) as texture data. Static texture memory stores texture data that is used by a polygon rasterizer (xe2x80x9crasterizerxe2x80x9d).
Conventional rendering systems are slow when polygon data is textured with live video data because video Mip Map data is continuously written into texture memory and at another instance the rasterizer attempts to read data from texture memory for rendering. Since we cannot read and write from the same memory location, memory conflict occurs. The problem gets worse when additional video channels are added because more time is spent in updating the texture memory than using the video texture for polygon rendering. The following describes existing techniques for rendering live video data.
FIG. 1 shows a conventional system for using video data as texture for rendering polygons. FIG. 1 shows an application software module 101 in a host computer system 101B that generates polygon descriptors for displaying a source image on a display device 107. Application software module 101 sends polygon descriptors 101A to a Rasterizer 102. Data is rasterized and polygon data is converted into fragment data. If polygon data is textured with video data then the color information related to each fragment generated from polygon data is read from static texture memory 103 and sent to a Z buffer 105, and thereafter sent to a frame buffer/video signal generator 106 that sends image data to display device 107.
Z buffer 105 sorts the fragment data from a rendered polygon relative to fragment from other polygons to maintain spatial order from a user""s perspective. A typical Z buffer 105 includes an array of memory locations (Z buffer memory) where each location contains color value (U and V coordinate) and Z values which is the distance of a polygon fragment from a view plane.
For rendering video data, a polygon is sent directly from a video source 104 to video capture unit 108 that sends digitized video data to texture memory 103. Video capture unit 108 may include a video decoder to decode incoming video data or a separate video decoder may be connected to video capture unit 108.
FIG. 1 also shows three cubes C1, C2 and C3 displayed at any instance. C1, C2 and C3 are textured with video data. However, only cube C1 changes position and/or rotates over a time period xe2x80x9ctxe2x80x9d. But in order to render video data as polygon texture, rasterizer 102, must re-rasterize all the three cubes over time period t. Texture data derived from the video source for the three cubes is stored in static texture memory 103, read from static texture memory 103 and are used to color polygon fragments that are then sent to display device 107 via buffer 105 and video signal generator 106. However, these operations are redundant because although only one cube is changing position, the stationery cubes must also be constantly re-rendered as well. This redundant rendering of objects that are static slows down the overall rendering process and is inefficient.
Hence, what is needed is a method and system that reduces the amount of data processing and efficiently displays video data without the foregoing continues re-rendering operations.
The present invention addresses the foregoing drawbacks by providing a method and apparatus that efficiently displays input video data as animated textures without redundant rasterizing. In one embodiment, the process steps receive the input digitized video data in a Mip Map generator, wherein the Mip Map generator converts the digitized video data to Mip Map data and stores the Mip Map data in a V buffer memory. The method further includes sending a data set from a Z buffer to a V buffer and converting the data set to a texel address in the V buffer. The data set includes U, V and Z coordinates, Mip Map level data and channel identification data. Also, the data set is mapped to texel RGB data by the V buffer memory and then transferred back to the Z buffer.
In another aspect, the present invention provides an apparatus for rendering the input video data. The apparatus includes the Mip Map generator that receives the input video stream and converts input digitized video data to Mip Map data; and a V buffer that receives the Mip Map data associated with the input video data and a data set from the Z buffer. The V buffer includes a V buffer fetch module that receives the data set from the Z buffer and maps it to a texel address containing RGB data within the V buffer memory.
By virtue of the foregoing aspects of the present invention, digitized video data is sent to the Mip Map generator and then the Mip Map data is sent to the V buffer. The V buffer maps data from the Z buffer to a texel address containing RGB data for display and the rasterizer does not have to re-render every polygon that has as an applied video texture.
This brief summary has been provided so that the nature of the invention may be understood quickly. A more complete understanding of the invention can be obtained by reference to the following detailed description of the preferred embodiments thereof in connection with the attached drawings.